/*
 * @Author: Aaron
 * @Date: 2022-02-18 17:15:37
 * @LastEditors: YanMeng
 * @LastEditTime: 2022-10-28 10:30:25
 * @Description: file content
 * @FilePath: \ias_ui\src\views\coi\commonJs\spuWarehouseTableHead.js
 * @Company: 沃尔玛
 */
// spu商品库
/**
 *
 * @param {*} arr 操作一栏按钮的参数，数组
 * @returns 表头list参数
 */
export const JDChosen = (arr = []) => {
  return [
    {
      type: 'selection',
      name: '复选框',
      value: 'selection',
      width: '40',
      minWidth: '110',
      fixed: 'left'
    },
    // {
    //   name: '主图',
    //   value: 'imageUrl',
    //   width: '80',
    //   slot: 'img'
    // },
    {
      name: '渠道商品编号',
      value: 'channelSpuId',
      minWidth: '100'
    },
    {
      name: 'upc(不含检验码)',
      value: 'upcNbrListString',
      minWidth: '120'
    },
    {
      name: '商品名称',
      value: 'spuName',
      minWidth: '120',
      slot: 'productName'
    },
    {
      name: 'sku数量',
      value: 'skuCount',
      minWidth: '80'
    },
    {
      name: '部门',
      value: 'deptNbr',
      minWidth: '80'
    },
    {
      name: '渠道品牌名称',
      value: 'channelBrandName',
      minWidth: '100'
    },
    {
      name: '渠道平台类目',
      value: 'categoryName',
      minWidth: '100'
    },
    {
      name: '渠道店内类目',
      value: 'shopCategoryName',
      minWidth: '100'
    },
    {
      name: '发布状态',
      value: 'lastPushResult',
      minWidth: '80'
    },
    {
      name: '失败原因',
      value: 'lastPushFailMsg',
      minWidth: '80'
    },
    {
      name: '操作',
      width: '110',
      fixed: 'right',
      btnList: [...arr, { text: '操作日志', on: 'operationLog' }]
    }
  ]
}

export const WalMartGoesHome = [
  {
    type: 'selection',
    name: '复选框',
    value: 'selection',
    width: '40',
    minWidth: '110',
    fixed: 'left'
  },
  {
    name: '渠道商品编号',
    value: 'channelSpuId',
    minWidth: '100'
  },
  {
    name: 'SPU名称',
    value: 'spuName',
    minWidth: '80',
    slot: 'productName'
  },
  {
    name: 'sku数量',
    value: 'skuCount',
    minWidth: '80'
  },
  {
    name: '部门',
    value: 'deptNbr',
    minWidth: '80'
  },
  {
    name: '发布状态',
    value: 'lastPushResult',
    minWidth: '80'
  },
  {
    name: '失败原因',
    value: 'lastPushFailMsg',
    minWidth: '80'
  },
  {
    name: '更新人',
    value: 'updateBy',
    minWidth: '80'
  },
  {
    name: '更新时间',
    value: 'updateTime',
    minWidth: '80'
  },
  {
    name: '操作',
    width: '110',
    btnList: [
      {
        text: '编辑',
        on: 'handleEdits',
        choose: {
          value: ['lastPushResult'],
          mainStatus: ['推送中'],
          lastPushResult: ['推送中'],
          isShowButtonLiu: true
        }
      },
      { text: '操作日志', on: 'operationLog' }
    ]
  }
]

export const serialInventory = [
  {
    name: 'SPU Id',
    value: 'spuCode',
    minWidth: '80'
  },
  {
    name: 'SPU名称',
    value: 'spuName',
    minWidth: '80',
    slot: 'productName'
  },
  {
    name: 'sku数量',
    value: 'skuSize',
    minWidth: '80'
  },
  {
    name: '部门',
    value: 'deptNbr',
    minWidth: '80'
  },
  {
    name: 'SPU备注',
    value: 'remark',
    minWidth: '80'
  },
  {
    name: '所在渠道',
    value: 'channelNames',
    minWidth: '80'
  },
  {
    name: '更新人',
    value: 'updateBy',
    minWidth: '80'
  },
  {
    name: '更新时间',
    value: 'updateTime',
    minWidth: '80'
  },
  {
    name: '操作',
    width: '110',
    btnList: [
      { text: '编辑', on: 'handleEdit' }
      // { text: '操作日志', on: 'operationLog' }
    ]
  }
]
// 商品库操作日志
export const operationLogTableHeader = [
  {
    name: '操作人',
    value: 'updateBy',
    minWidth: '80'
  },
  {
    name: '操作时间',
    value: 'updateTime',
    minWidth: '80'
  },
  {
    name: '推送结果',
    value: 'pushResultContent',
    minWidth: '80'
  },
  {
    name: '备注',
    value: 'operationRemark',
    minWidth: '80'
  }
]
export const operationLogTableHeaderList = [
  {
    name: '操作人',
    value: 'createBy',
    minWidth: '80'
  },
  {
    name: '操作时间',
    value: 'createDateTime',
    minWidth: '80'
  },
  {
    name: '推送结果',
    value: 'pushResultContent',
    minWidth: '80'
  },
  {
    name: '备注',
    value: 'operationRemark',
    minWidth: '80'
  }
]

// spu新建维护操作日志

export const spuOperationLogTableHeader = [
  {
    name: '操作人',
    value: 'updateUserId',
    minWidth: '80'
  },
  {
    name: '操作时间',
    value: 'updateTime',
    minWidth: '80'
  },
  {
    name: '操作内容',
    value: 'mainRemark',
    minWidth: '100'
  },
  {
    name: '备注',
    value: 'subRemark',
    minWidth: '100'
  }
]
